namespace Cos.Core.NHibernate
{
    #region Usings

    using System;

    #endregion

    public class UserDataModel
    {
        #region Constructors and Destructors

        public UserDataModel() {}

        #endregion

        #region Properties

        public virtual string ApplicationName { get; set; }

        public virtual string Comment { get; set; }

        public virtual DateTime CreationDate { get; set; }

        public virtual string Email { get; set; }

        public virtual int FailedPasswordAnswerAttemptCount { get; set; }

        public virtual DateTime? FailedPasswordAnswerAttemptWindowStart { get; set; }

        public virtual int FailedPasswordAttemptCount { get; set; }

        public virtual DateTime? FailedPasswordAttemptWindowStart { get; set; }

        public virtual bool? IsApproved { get; set; }

        public virtual bool IsLockedOut { get; set; }

        public virtual bool IsOnline { get; set; }

        public virtual DateTime? LastActivityDate { get; set; }

        public virtual DateTime? LastLockedOutDate { get; set; }

        public virtual DateTime? LastLoginDate { get; set; }

        public virtual DateTime? LastPasswordChangeDate { get; set; }

        public virtual Guid PKID { get; set; }

        public virtual string Password { get; set; }

        public virtual string PasswordAnswer { get; set; }

        public virtual string PasswordQuestion { get; set; }

        public virtual string Username { get; set; }

        #endregion

        #region Object Overrides

        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return false;
            }

            var model = obj as UserDataModel;

            return model != null && this.PKID == model.PKID;
        }

        public override int GetHashCode()
        {
            return this.PKID.GetHashCode();
        }

        #endregion
    }
}